﻿using System;
using System.Collections.Generic;
using SobrietyEngine.Components.Common;
using SobrietyEngine.Components.Graphic;
using SobrietyEngine.Scene;
using Microsoft.Xna.Framework;

namespace SobrietyEngine.Actor.Builders.GUI
{
    public class Text2D:BaseActorBuilder
    {
        public static IActor Build(IScene scene, Vector2 pos, String text)
        {
            IActor actor = scene.CreateEmptyActor();

            actor.AttachComponent(new PositionCmp(pos));
            actor.AttachComponent(new DrawableText(text));

            actor.Initialize();
            return actor;
        }
    }
}
